import request from '@/utils/request'

// 查询会员列表
export function listMember(query) {
    return request({
        url: '/member/member/list',
        method: 'get',
        params: query
    })
}

// 查询会员详细
export function getMember(id) {
    return request({
        url: '/member/member/' + id,
        method: 'get'
    })
}

// 新增会员
export function addMember(data) {
    return request({
        url: '/member/member',
        method: 'post',
        data: data
    })
}

// 修改会员
export function updateMember(data) {
    return request({
        url: '/member/member',
        method: 'put',
        data: data
    })
}

// 删除会员
export function delMember(id) {
    return request({
        url: '/member/member/' + id,
        method: 'delete'
    })
}
// 会员登录
export function login(query) {
    return request({
        url: '/member/member/login',
        method: 'post',
        params: query
    })
}
// 注册查重
export function register(query) {
    return request({
        url: '/member/member/register',
        method: 'put',
        params: query
    })
}